<table class="table table-hover table-striped">
  <thead>
    <tr>
      <th>会员名</th>
      <th>充值日期</th>
      <th>充值金额</th>    
    </tr>
  </thead>
  <tbody>
    <% locals.topups.forEach(function(u,index){ %>      
    <tr>
      <td><%= u.user %></td>
      <td><%= u.date.format('yyyy-MM-dd hh:mm') %></td>
      <td><%= u.money %></td>
      <td>
        <a href="javascript:void(0)" title="删除"  onclick="delConfirm('/topup/del/<%= u.id %>','确定要删除这条充值记录吗？');" class="btn btn-default"><span class="glyphicon glyphicon-minus"></span></a>
      </td>
    </tr>
    <% }); %>
  </tbody>
</table>
<ul class="pagination">
  <li><a href="/topup/query?num=1">&laquo;</a></li>
  <%
  var first = Math.max(1,locals.num - 5);
  var end = Math.min(locals.pageCount,Number(locals.num) + 5);
  if(first > 1) {
  %>
  <li><a href="/topup/query?num=<%= first-1 %>">...</a></li>
  <%}
  for(var i = first ; i <= end ; i++ ) {
  if(locals.num == i) { %>
  <li class="active"><a href="/topup/query?num=<%= i %>"><%= i %></a></li>
  <% } else{ %>
  <li><a href="/topup/query?num=<%= i %>"><%= i %></a></li>
  <% }}
  if(end < locals.pageCount) {
  %>
  <li><a href="/topup/query?num=<%= end + 1 %>">...</a></li>
  <%}%>
  <li><a href="/topup/query?num=<%= locals.pageCount%>">&raquo;</a></li>
</ul>